package com.guoxue.uploadUtils;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

public class GetProperties {

	public static Properties getResource(){
		Properties props = new Properties();
		InputStreamReader in = null;
		try {
		FileInputStream fInputStream = new FileInputStream("resouce.properties");
		in = new InputStreamReader(fInputStream, "utf8");
		props.load(in);
		} catch (FileNotFoundException e1) {
		System.out.println("未找到文件");
		e1.printStackTrace();
		} catch (IOException e1) {
		System.out.println("IO异常");
		e1.printStackTrace();
		}finally {
			try {
				in.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return props;
	}
	
}
